<#include "/common/header.html" />
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInUp">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox">
                    <div class="ibox-title">
                        <h5>新闻列表</h5>
                        <div class="ibox-tools">
                            <a href="toadd" class="btn btn-primary btn-xs">添加新闻</a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="row m-b-sm m-t-sm">
                            <form action="list" method="get" id="seachForm">
                            <div class="col-md-4">
                                    <input type="text" value="" name="title" placeholder="请输入新闻标题" class="input-sm form-control">
                            </div>
                            <div class="col-md-2">
                                <button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
                            </div>
                             </form>
                        </div>
                        <div class="list-group">
                            
                            <#list pageInfo.records as temp>
                          	<a class="list-group-item" >
                                <h3 class="list-group-item-heading">${temp.title}</h3>
                                <p class="list-group-item-text">${temp.content}</p>
                                <p class="list-group-item-text text-right">${temp.createTime}</p>
                            </a>
                          	</#list>   
                        </div>
                          <div class="btn-group text-center">
                               	<#if pageInfo.hasPrevious()>
                               	<a onclick="rollPage(1)" class="btn btn-white">首页</a>
                                <a onclick="rollPage(${pageInfo.current - 1})" class="btn btn-white"><i class="fa fa-chevron-left"></i> 上一页</a>
                                </#if>
                                <#if pageInfo.hasNext() >
	                                <a onclick="rollPage(${pageInfo.current + 1})" class="btn btn-white">下一页 <i class="fa fa-chevron-right"></i></a>
	                                <a onclick="rollPage(${pageInfo.pageCounts})" class="btn btn-white">末页</a>
	                            </#if>
	                            <a class="btn btn-white">[${pageInfo.current}/${pageInfo.pageCounts}]</a>
                              </div>
                         </div>
                    </div>
                </div>
            </div>
        </div>
  <#include "/common/footer.html" />  
</body>
</html>